<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
  <title>注册</title>
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<div class="container">
  <h2>员工信息管理系统 - 注册</h2>
  <c:if test="${not empty error}">
    <p style="color:red;">${error}</p>
  </c:if>
  <form action="${pageContext.request.contextPath}/AuthServlet?action=register" method="post">
    <p>
      <label for="username">用户名:</label>
      <input type="text" id="username" name="username" required>
    </p>
    <p>
      <label for="password">密码:</label>
      <input type="password" id="password" name="password" required>
    </p>
    <p><input type="submit" value="注册"></p>
  </form>
  <p><a href="${pageContext.request.contextPath}/login.jsp">返回登录</a></p>
</div>
</body>
</html>
